package cn.iocoder.yudao.module.trade.enums.reminder;

import cn.hutool.core.util.ArrayUtil;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * 售后操作类型的枚举
 *
 * @author 陈賝
 * @since 2023/6/13 13:53
 */
@RequiredArgsConstructor
@Getter
public enum ReminderReasonEnum {

    IMMEDIATE_DELIVERY(0, "立即送达"),
    HALF_HOUR_DELIVERY(1, "半小时内送达"),
    ONE_HOUR_DELIVERY(2, "一小时内送达"),
    ;

    /**
     * 操作类型
     */
    private final Integer type;
    /**
     * 操作描述
     */
    private final String content;

    public static ReminderReasonEnum valueOf(Integer type) {
        return ArrayUtil.firstMatch(chargeMode -> chargeMode.getType().equals(type), ReminderReasonEnum.values());
    }

}
